package com.cloud.fim.gate.container;


import com.cloud.fim.gate.container.repository.InMemorySessionRepository;

/**
 * <p></p>
 *
 * @author GaoShuangWen
 */
public class SessionManagerHolder {

    private static SessionManager manager;

    static {
        initialize();
    }

    private static void initialize() {
        manager = new SessionManager(new InMemorySessionRepository());
    }

    public static SessionManager getManager() {
        return manager;
    }

    public static Session createSession(Integer cid, Session session) {
        manager.createSession(cid, session);
        return session;
    }

    public static void removeSession(Integer cid) {
        manager.removeSession(cid);
    }

}
